import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;

public class ThreadDemo4 {
    public static void main(String[] args) {
        AtomicInteger atomicInteger = new AtomicInteger(0);
        atomicInteger.addAndGet(2); // i += delta
        atomicInteger.decrementAndGet(); //--i
        atomicInteger.getAndDecrement(); //i--
        atomicInteger.incrementAndGet(); //++i
        atomicInteger.getAndIncrement(); //i++
    }
}
